home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.19971216-19980424 / 000095_news@newsmaster….columbia.edu _Thu Jan 15 16:29:16 1998.msg < prev    next >
Internet Message Format  |  1998-04-22  |  3KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA20416
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 15 Jan 1998 16:29:16 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id QAA21363
  7.     for kermit.misc@watsun; Thu, 15 Jan 1998 16:29:16 -0500 (EST)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: stderr under cgi
  12. Date: 15 Jan 1998 21:29:15 GMT
  13. Organization: Columbia University
  14. Lines: 49
  15. Message-ID: <69lv3b$e4b$1@apakabar.cc.columbia.edu>
  16. References: <1998Jan15.111432@merlin.ecid.cig.mot.com>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:8268
  19.  
  20. In article <1998Jan15.111432@merlin.ecid.cig.mot.com>,
  21. Robert Cornell <cornellr@merlin.ecid.cig.mot.com> wrote:
  22. : I have a couple of cgi scripts that perform all manner of admin
  23. : tasks on a pool of modems.  The scripts all work fine, however I
  24. : always seem to get an error message if I call kermit from within
  25. : perl. i.e:
  26. : #!/usr/local/bin/kermit
  27. : ...
  28. : ...
  29. : is OK, but:
  30. : #!/usr/local/bin/perl
  31. : ...
  32. : system("/usr/local/bin/kermit -C script.ksc");
  33. :  
  34. I don't understand this command line.  -C means "a list of
  35. interactive-mode kermit commands follows", as in:
  36.  
  37.   /usr/local/bin/kermit -C "echo hi there, take script.ksc, exit"
  38.  
  39. If all you want Kermit to do is execute the file script.ksc, the
  40. command line should look like this:
  41.  
  42.   /usr/local/bin/kermit script.ksc
  43.  
  44. (see the manual).
  45.  
  46. : [This] gives:
  47. : Warning: terminal type unknown: ""
  48. : Fullscreen file transfer display disabled.
  49. :  Is this down to the httpd not having a TERM env variable.
  50. :  I tried redirecting stderr, assigning \$(TERM), any ideas?
  51. This is because Kermit is trying to initialize curses, which it uses
  52. in its (default) fullscreen file-transfer display.  But since this
  53. is not an interactive session, you probably don't want any display
  54. at all, so tell it so:
  55.  
  56. system("/usr/local/bin/kermit -C \"set xfer displ none,tak script.ksc\"");
  57.  
  58. But if "set transfer display full" is in your Kermit initialization
  59. file, you'll probably still see the message.  Anyway, the message is
  60. harmless.  You can also redirect Kermit's output to a file, or
  61. /dev/null if you want to log or not see messages like this.
  62.  
  63. - Frank